package com.nbstar.film.spider.font.woff.table.glyf;

import java.io.Serializable;

/**
 * @Description: 功能描述：坐标点
 *
 * @ClassName: Point
 * @author: Wang Xindong
 * @date: 2018年9月7日 上午9:07:13
 * @email: wangxindong@travelsky.com
 * @Copyright: Copyright (c) 2018. All rights reserved.
 */
public class Point implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private int x = 0;
	private int y = 0;
	/**
	 * 是否在线上
	 */
	private boolean onCurve = true;

	/**
	 * 是否是最后一个点
	 */
	private boolean endOfContour = false;

	Point(int xValue, int yValue, boolean onCurveValue, boolean endOfContourValue) {
		x = xValue;
		y = yValue;
		onCurve = onCurveValue;
		endOfContour = endOfContourValue;
	}

	Point(int xValue, int yValue) {
		this(xValue, yValue, true, false);
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public boolean isOnCurve() {
		return onCurve;
	}

	public void setOnCurve(boolean onCurve) {
		this.onCurve = onCurve;
	}

	public boolean isEndOfContour() {
		return endOfContour;
	}

	public void setEndOfContour(boolean endOfContour) {
		this.endOfContour = endOfContour;
	}

	@Override
	public String toString() {
		return "Point [x=" + x + ", y=" + y + ", onCurve=" + onCurve + ", endOfContour=" + endOfContour + "]";
	}
}
